package com.muchfish.reactor.api;

import reactor.core.publisher.Flux;

public class ReactorCreate2Example {
    public static void main(String[] args) {
        Flux<Integer> customFlux = Flux.create(emitter -> {
            for (int i = 1; i <= 5; i++) {
                emitter.next(i);
            }
            emitter.complete();
        });

        customFlux.subscribe(System.out::println);
    }
}
